package com.rayo.accesscontrollercopy.app;

import android.content.Context;
import android.os.Handler;
import android.os.Message;

import java.lang.ref.WeakReference;

/**
 * Created by yanghaojie on 16/7/25.
 */
public abstract class BasePresenter extends Handler {
    protected WeakReference<Context> reference;

    protected void init(Context context) {
        reference = new WeakReference<>(context);
    }

    public void handleMessage(Message msg) {
        super.handleMessage(msg);
        message(msg);
    }

    protected abstract void message(Message msg);

    public abstract void initData();
}
